Optimal. Leaf size=86 \[ \sqrt {2} \tan ^{-1}\left (\frac {1-\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )-\sqrt {2} \tan ^{-1}\left (\frac {1+\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )+\tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 9, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.281, Rules used = {1042, 1000,
12, 1040, 1175, 632, 210, 1041, 212} \begin {gather*} \sqrt {2} \text {ArcTan}\left (\frac {1-\frac {x+3}{\sqrt {-x^2-4 x-3}}}{\sqrt {2}}\right )-\sqrt {2} \text {ArcTan}\left (\frac {\frac {x+3}{\sqrt {-x^2-4 x-3}}+1}{\sqrt {2}}\right )+\tanh ^{-1}\left (\frac {x}{\sqrt {-x^2-4 x-3}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 210
Rule 212
Rule 632
Rule 1000
Rule 1040
Rule 1041
Rule 1042
Rule 1175
Rubi steps
\begin {align*} \int \frac {3+4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx &=-\left (3 \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\right )-\int \frac {-6-4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\\ &=\frac {1}{2} \int \frac {-6-4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx-\frac {1}{2} \int -\frac {4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx+6 \text {Subst}\left (\int \frac {1}{3-3 x^2} \, dx,x,\frac {x}{\sqrt {-3-4 x-x^2}}\right )\\ &=2 \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+2 \int \frac {x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx-3 \text {Subst}\left (\int \frac {1}{3-3 x^2} \, dx,x,\frac {x}{\sqrt {-3-4 x-x^2}}\right )\\ &=\tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+16 \text {Subst}\left (\int \frac {1+3 x^2}{-4-8 x^2-36 x^4} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )\\ &=\tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )-\frac {2}{3} \text {Subst}\left (\int \frac {1}{\frac {1}{3}-\frac {2 x}{3}+x^2} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )-\frac {2}{3} \text {Subst}\left (\int \frac {1}{\frac {1}{3}+\frac {2 x}{3}+x^2} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )\\ &=\tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+\frac {4}{3} \text {Subst}\left (\int \frac {1}{-\frac {8}{9}-x^2} \, dx,x,\frac {2}{3} \left (-1+\frac {3+x}{\sqrt {-3-4 x-x^2}}\right )\right )+\frac {4}{3} \text {Subst}\left (\int \frac {1}{-\frac {8}{9}-x^2} \, dx,x,\frac {2}{3} \left (1+\frac {3+x}{\sqrt {-3-4 x-x^2}}\right )\right )\\ &=\sqrt {2} \tan ^{-1}\left (\frac {1-\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )-\sqrt {2} \tan ^{-1}\left (\frac {1+\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )+\tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 51, normalized size = 0.59 \begin {gather*} -\sqrt {2} \tan ^{-1}\left (\frac {3+2 x}{\sqrt {2} \sqrt {-3-4 x-x^2}}\right )+\tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.35, size = 123, normalized size = 1.43
method | result | size |
default | \(\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \left (\sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}\, \sqrt {2}}{6}\right )-\arctanh \left (\frac {3 x}{\left (-\frac {3}{2}-x \right ) \sqrt {\frac {3 x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-12}}\right )\right )}{6 \sqrt {\frac {\frac {x^{2}}{\left (-\frac {3}{2}-x \right )^{2}}-4}{\left (1+\frac {x}{-\frac {3}{2}-x}\right )^{2}}}\, \left (1+\frac {x}{-\frac {3}{2}-x}\right )}\) | \(123\) |
trager | \(\RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right ) \ln \left (-\frac {-4 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right )^{2} x +12 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right ) x +6 \sqrt {-x^{2}-4 x -3}+12 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right )-5 x -6}{2 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right ) x +x +3}\right )-\ln \left (-\frac {-4 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right )^{2} x -4 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right ) x +6 \sqrt {-x^{2}-4 x -3}-12 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right )+3 x +6}{2 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right ) x -3 x -3}\right ) \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right )+\ln \left (-\frac {-4 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right )^{2} x -4 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right ) x +6 \sqrt {-x^{2}-4 x -3}-12 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right )+3 x +6}{2 \RootOf \left (4 \textit {\_Z}^{2}-4 \textit {\_Z} +3\right ) x -3 x -3}\right )\) | \(283\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 132, normalized size = 1.53 \begin {gather*} \frac {1}{2} \, \sqrt {2} \arctan \left (\frac {\sqrt {2} x + 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) + \frac {1}{2} \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} x - 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) - \frac {1}{4} \, \log \left (-\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x + 4 \, x + 3}{x^{2}}\right ) + \frac {1}{4} \, \log \left (\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x - 4 \, x - 3}{x^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {4 x + 3}{\sqrt {- \left (x + 1\right ) \left (x + 3\right )} \left (2 x^{2} + 4 x + 3\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 163 vs.
\(2 (73) = 146\).
time = 2.44, size = 163, normalized size = 1.90 \begin {gather*} \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) + \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {\sqrt {-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) + \frac {1}{2} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 1\right ) - \frac {1}{2} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {{\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {4\,x+3}{\sqrt {-x^2-4\,x-3}\,\left (2\,x^2+4\,x+3\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________